package com.example.mapper;


import com.example.entity.LiuyanMessage;
import org.apache.catalina.util.Introspection;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface LiuYanMapper {

    @Insert("insert into liuyan_message(author_id,author_name,text,create_time) values(#{authorId},#{authorName},#{text},#{createTime})")
    void insert(LiuyanMessage liuyanMessage);

    @Delete("delete from liuyan_message where id=#{id}")
    void deleteById(Integer id);


    List<LiuyanMessage> selectAll(Integer authorId, String authorName);
}
